const App = getApp()
Page({
  data: {
    list: [],
    pageShow:false
  },
  onLoad: function (options) {
    let that = this
    that.oil()
  },
  onReady: function () {
  },
  oil() {
    let that=this
    App.api.$http({
      url: 'User/detail',
      method: 'Post',
      data: {}
    }, {}).then(res => {
      that.setData({
        ...res.data.userInfo
      })
    })
  },
  list() {
    let that = this
    App.api.$http({
      url: 'points.log/index',
      method: 'Post',
      data: {}
    }, {}).then(res => {
      
      if (res) {
        that.setData({
          pageShow:true,
          list: res.data.list.data
        })
      }
    })
  },
  onShow: function () {
    let that = this
    that.list()
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})